fish set
ドキュメント: set - display and change shell variables — fish-shell 4.3.3 documentation
set
code:memo
-a --append (Append value to a list)
-e --erase (Erase variable)
-g --global (Make variable scope global)
-h --help (Display help and exit)
-L --long (Do not truncate long lines)
-l --local (Make variable scope local)
-n --names (List the names of the variables, but not their value)
-p --prepend (Prepend value to a list)
-q --query (Test if variable is defined)
-S --show (Show variable)
-U --universal (Share variable persistently across sessions)
-u --unexport (Do not export variable to subprocess)
-x --export (Export variable to subprocess)
変数を設定する
$ set var 100
$ echo $var
変数をexportする
$ set -x filepath
-x, --export: bashなどのexport相当
変数を削除する
$ set -e var
PATHを設定する場合fish_add_pathを使う。
#fish